import Mock from 'mockjs';

// 设置延时时间
Mock.setup({
    timeout: "100-500",
});

export default {
    login() {
        Mock.mock("/api/login", "post", req => {
            let arr = JSON.parse(req.body);
            if(arr.email == "admin@163.com" && arr.password == "123456"){
                return {
                    code : 1,
                    msg : "成功",
                    token: "teosdsfdfdksdfs232323",
                }
                
            }else {
                return {
                    code: 0,
                    msg: "账号密码错误",
                };
            }
        });
    }
}